package org.zero.onlinesubject.service;

import org.zero.onlinesubject.common.vo.ChapterVo;
import org.zero.onlinesubject.entity.Chapter;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;

/**
 *
 */
public interface ChapterService extends IService<Chapter> {

    List<ChapterVo> getChapterByCourseId(String courseId) throws ExecutionException, InterruptedException;

    Boolean delCosChapter(String chapterId) throws ExecutionException, InterruptedException, TimeoutException;

    void updateLikeCount(String courseId);

    Integer getLastOrderByCourseId(String courseId);

    Boolean addChapterInfo(Chapter chapter);

    Boolean delChapter(String courseId,String chapterId);
}
